<?php
/**
 * Nakładka na Doctrine_Pager_Layout
 * 
 * @author tomasz sierżański
 *
 */
class Core_Pagerarrows extends Doctrine_Pager_Layout
{
	public function display($options = array(), $return = false)
	{
	$pager = $this->getPager();
	$str = '';
	// Previous page
	$this->addMaskReplacement('page', '<div class="mniej"></div>', true);
	$options['page_number'] = $pager->getPreviousPage();
	$str .= $this->processPage($options);

	// Next page
	$this->addMaskReplacement('page', '<div class="wiecej"></div>', true);
	$options['page_number'] = $pager->getNextPage();
	$str .= $this->processPage($options);

	// Possible wish to return value instead of print it on screen
	if ($return) {
		return $str;
	}
	echo $str;
    }
}